home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 1
/
Gold Medal Software Volume 1 (Gold Medal) (1994).iso
/
drivers
/
ljp3fw.arj
/
LJFORM.PRG
< prev
next >
Wrap
Text File
|
1993-09-15
|
9KB
|
249 lines
#include "ljprtiii.ch"
function FormBld()
local nX := 4.5
local nOldCPI, nOldLPI
@ 5,10 say "Printing Form Graphics/Boxes"
/* please notice I did not "SET PRINT ON" or "DEVICE TO" or any thing
let the LJ_ routines handle that for you.
you will want to do those things when directly accessing the printer
with @ x,y say ... Get, or ?/?? commands ++ see below
*/
// ship to box
LJ_Box( { INCHES, 0.04, .25 , 1.32, 4.2, 0.02, SHADED_FILL, 100 } )
// sold to box
LJ_Line( ROWCOL,10.2, 2.5, 40, 9, SHADED_FILL, 10)
// invoice Header info box
LJ_Box( { INCHES, 1.70 , 4.5, 3.20, 7.98, 0.018, 2, 100 } )
// HORIZONTAL LINES - top to bottom 1 - 8
LJ_Line( INCHES, 1.86, nX, 3.5, 0.002, BLACK_FILL, 100 ) // line 1
LJ_Line( INCHES, 2.04, nX, 3.5, 0.002, BLACK_FILL, 100 ) // line 2
LJ_Line( INCHES, 2.20, nX, 3.5, 0.002, BLACK_FILL, 100 ) // line 3
LJ_Line( INCHES, 2.34, nX, 3.5, 0.002, BLACK_FILL, 100 ) // line 4
LJ_Line( INCHES, 2.51, nX, 3.5, 0.002, BLACK_FILL, 100 ) // line 5
LJ_Line( INCHES, 2.67, nX, 3.5, 0.002, BLACK_FILL, 100 ) // line 6
LJ_Line( INCHES, 2.86, nX, 3.5, 0.002, BLACK_FILL, 100 ) // line 7
LJ_Line( INCHES, 3.01, nX, 3.5, 0.002, BLACK_FILL, 100 ) // line 8
// VERTICAL LINES left to right 1 - 4
LJ_Line( INCHES, 2.67, 5.3, 0.003, 0.55, BLACK_FILL, 100 ) // line 1
LJ_Line( INCHES, 1.70, 5.75, 0.003, 1.50, BLACK_FILL, 100 ) // line 2
LJ_Line( INCHES, 2.67, 6.25, 0.003, 0.34, BLACK_FILL, 100 ) // line 3
LJ_Line( INCHES, 1.70, 7.15, 0.003, 0.35, BLACK_FILL, 100 ) // line 4
// SHADED HORIZONTAL LINES - top to bottom 1 - 5
LJ_Line( INCHES, 1.70, nX, 3.5, 0.167, SHADED_FILL, 10 ) // line 1
LJ_Line( INCHES, 2.04, nX, 3.5, 0.166, SHADED_FILL, 10 ) // line 2
LJ_Line( INCHES, 2.340, nX, 3.5, 0.166, SHADED_FILL, 10 ) // line 3
LJ_Line( INCHES, 2.670, nX, 0.8, 0.55 , SHADED_FILL, 10 ) // line 4
LJ_LINE( INCHES, 2.670, nX+1.25, 0.5, 0.33 , SHADED_FILL, 10 ) // line 5
// box 4 Detail Info
LJ_Box( { INCHES, 3.35, 0.0, 3.52, 5.0, 0.015, SHADED_FILL, 100 } )
LJ_Box( { INCHES, 3.53, 0.0, 8.78, 7.97, 0.015, SHADED_FILL, 100 } )
LJ_Line( INCHES, 3.35, 0.0, 1.0, 0.166, SHADED_FILL, 10 )
LJ_Line( INCHES, 3.53, 0.0, 7.98, 0.166, SHADED_FILL, 10 )
LJ_Line( INCHES, 3.68, 0.0, 8.0, 0.002, BLACK_FILL, 100 )
LJ_Line( INCHES, 3.53, 0.55, 0.003, 5.25, BLACK_FILL, 100 )
LJ_Line( INCHES, 3.53, 1.64, 0.003, 5.25, BLACK_FILL, 100 )
LJ_Line( INCHES, 3.53, 5.735, 0.003, 5.25, BLACK_FILL, 100 )
LJ_Line( INCHES, 3.53, 6.60, 0.003, 5.25, BLACK_FILL, 100 )
LJ_Line( INCHES, 3.53, 6.95, 0.003, 5.25, BLACK_FILL, 100 )
// invoice totals / summary box
LJ_Box( { INCHES, 8.84, 0.0, 9.50, 7.98, 0.015, BLACK_FILL, 100 } )
LJ_Box( { INCHES, 8.84, 6.5, 9.48, 7.96, 0.035, BLACK_FILL, 100 } )
LJ_Line( INCHES, 8.84, 0.0, 8.0, 0.350, SHADED_FILL, 15 )
LJ_Line( INCHES, 9.19, 0.0, 8.0, 0.002, BLACK_FILL, 100 )
LJ_Line( INCHES, 8.84, 1.455, 0.003, 0.68, BLACK_FILL, 100 )
LJ_Line( INCHES, 8.84, 2.84, 0.003, 0.68, BLACK_FILL, 100 )
LJ_Line( INCHES, 8.84, 3.5, 0.003, 0.68, BLACK_FILL, 100 )
LJ_Line( INCHES, 8.84, 4.78, 0.003, 0.68, BLACK_FILL, 100 )
@ 7,10 say "Printing Form Text"
// set print to Compressed / 16.66 cpi mode
nOldCPI := LJ_SetLn( 1, 16.66 )
LJ_Send_CC( LJ_Font_SS( PRIMARY_SYMBOL_SET, ;
PC_8, ;
PROPORTIONAL_SPACING, ;
0,;
8,;
ITALIC, ;
THIN,;
UNIVERS ) )
// invoice Header info TEXT
LJ_Say_YX( ROWCOL, 11, 80, "Invoice Date")
LJ_Say_YX( ROWCOL, 13, 80, "Our Order # ")
LJ_Say_YX( ROWCOL, 15, 80, "Account No. ")
LJ_Say_YX( ROWCOL, 17, 77, "Taxable % ")
LJ_Say_YX( ROWCOL, 18, 77, "Our Truck ")
LJ_Say_YX( ROWCOL, 19, 77, "Ship Via ")
LJ_Say_YX( ROWCOL, 11, 96, "Invoice Number")
LJ_Say_YX( ROWCOL, 13, 96, "Your Order # ")
LJ_Say_YX( ROWCOL, 15, 96, "Sales Rep. ")
LJ_Say_YX( ROWCOL, 17, 96, "Terms: ")
LJ_Say_YX( ROWCOL, 18, 96, "F.O.B. ")
LJ_Say_YX( ROWCOL, 11, 120, "Page")
LJ_Say_YX( ROWCOL, 21, 1, "Job Description:")
LJ_Say_YX( ROWCOL, 22, 1, "Prd Code Quantity Description")
LJ_Say_YX( ROWCOL, 22, 99, "Unit Price Per Extension")
// set print to Normal / 10 cpi mode
LJ_SetLn( 1, nOldCPI )
LJ_Send_CC( LJ_Font_SS( PRIMARY_SYMBOL_SET, ;
PC_8, ;
FIXED_SPACING, ;
10,;
12,;
UPRIGHT_SOLID, ;
SEMI_LIGHT,;
COURIER ) )
LJ_Say_YX( ROWCOL, 0, 3, "SOLD BY:" )
LJ_Say_YX( ROWCOL, 11, 3, "Sold To:" )
LJ_Say_YX( ROWCOL, 0, 29, "R O U G H D R A F T I N V O I C E")
LJ_Say_YX( ROWCOL, 54, 3, "Total of")
LJ_Say_YX( ROWCOL, 54, 19, "Taxable" )
LJ_Say_YX( ROWCOL, 55, 2, "Merchandise")
LJ_Say_YX( ROWCOL, 55, 16, "Merchandise")
LJ_Say_YX( ROWCOL, 54, 30, " MN ")
LJ_Say_YX( ROWCOL, 55, 30, "TAX %")
LJ_Say_YX( ROWCOL, 54, 37, "Minnesota")
LJ_Say_YX( ROWCOL, 55, 37, "Sales Tax")
LJ_Say_YX( ROWCOL, 55, 48, "Shipping/Handling")
LJ_Say_YX( ROWCOL, 55, 68, "AMOUNT DUE")
LJ_Say_YX( ROWCOL, 59, 28, "Thank You For Your Business!")
LJ_Say_YX( ROWCOL, 60, 2, "[Original]")
@ 9,10 say "Printing Form Debugging Marks"
// FORM DEBUGGING MARKS - DELETE THESE BEFORE PUTTING CODE INTO PRODUCTION
LJ_Say_YX(ROWCOL, 0, 0, "█")
LJ_Say_YX(ROWCOL, 0, 40, "█")
LJ_Say_YX(ROWCOL, 0, 79, "█")
LJ_Say_YX(ROWCOL, 60, 0, "█")
LJ_Say_YX(ROWCOL, 60, 40, "█")
LJ_Say_YX(ROWCOL, 60, 79, "█")
*
// AND now back to DEFAULT/CLIPPER print formatting
@ 11,10 say "Form Completed!"
LJ_Say_YX( ROWCOL,0,0," ") // reset print cursor to row 0, col 0
return nil
function PrtInvoice()
// AND now back to DEFAULT/CLIPPER print formatting
local cInvNo ,;
lConsole ,;
cDevice ,;
lPrinter
cInvNo := "I"+right(dtoc(date()),2)+"-C01"
LJ_PosRC( 0, 0)
lConsole := set(_SET_CONSOLE, .F.) // SET CONSOLE OFF
cDevice := set(_SET_DEVICE , "PRINTER") // SET DEVICE TO PRINTER
lPrinter := set(_SET_PRINTER, .T.) // SET PRINTER ON
SETPRC( 0, 0 )
@ 1, 5 say "Capitol City Software Inc"
@ 2, 5 say "Box 15303 "
@ 3, 5 say "Minneapolis MN 55415-0303"
@ 5, 5 say "Vox. (612) 376-0054"
@ 6, 5 say "Fax. (999) 999-9999"
@ 7, 5 say "CI$ - 76276,1333"
@ 11,47 SAY DATE() PICTURE "@D"
@ 11,59 SAY cInvNo
@ 11,74 SAY "1"
@ 12, 5 say "Your Name Here"
@ 13, 5 say "Your Title Here"
@ 14, 5 say "Secondary Address Line Here"
@ 15, 5 say "Primary Address Line Here"
@ 15,46 SAY "93-09-1001"
@ 15,59 SAY "Kevin Loucks"
@ 16, 5 say "City, State Zip Line Here"
@ 16,63 SAY "Check/MoneyOrder"
@ 23, 1 SAY "SRC"
@ 23,10 SAY "1"
@ 23,17 SAY "LJPRTIII (tm) Version 1.04"
@ 23,60 SAY "39.95"
@ 23,67 SAY "EA"
@ 23,74 SAY "39.95"
@ 24,17 SAY "Complete Product Source Code "
@ 35,17 SAY "This PRODUCT is intended for PCL 5 "
@ 36,17 SAY "compatible printers (i.e. HPIIIp) "
@ 37,17 SAY "if you don't have one dont even try"
@ 38,17 SAY "making this thing work! "
@ 40,17 SAY "Payment methods currently consist of "
@ 41,17 SAY "Checks or Money Orders (US Dollars) made"
@ 42,17 SAY "out to Capitol City Software Inc! "
@ 45,17 SAY "Sorry no credit cards or PO's! "
@ 48,17 SAY "Support by phone is Not available! "
@ 49,17 SAY "If you must call anyway, you must rely "
@ 50,17 SAY "on me being in a WARM FUZZY mood. >:-< "
@ 56, 2 SAY "$ 39.95"
@ 56,18 SAY "$ 39.95"
@ 56,30 SAY "7.00"
@ 56,40 SAY "2.80"
@ 56,56 SAY "$ 5.00"
// @ 56,70 SAY "$ 47.75" // if order from outside minnesota
// @ 56,70 SAY "$ 44.95" // if order from inside minnesota
set(_SET_DEVICE, cDevice ) // Restore device setting
set(_SET_PRINTER, lPrinter) // Restore printer setting
set(_SET_CONSOLE, lConsole) // Restore console setting
RETURN NIL